/**
 * @file
 * Created by hanan on 16/10/15.
 */
import login from 'views/login';
import list from 'views/list';
import list2 from 'views/list2';
import jifen from 'views/jifen';
import selectall from 'views/selectall';
import selectbyid from 'views/selectbyid';
import add from 'views/add';
// 根目录
const rootPath = '';
const includedComponents="login";
// 页面路由
const routes = [
  {path: '', redirect: {name: 'login'}},
  {path: '/login', component: login, name: 'login'},//登陆页面
    {
        path:"/list/:userid",
        component:list,
        name:'list'
    },//普通登陆成功页面
    {path:"/list2/:id",component:list2,name:'list2'},//党支部登陆成功页面
    {path:"/jifen/:id",
        component:jifen,
        name:'jifen'
    },//积分
    {path:"/selectall/:id",
        component:selectall,
        name:'selectall'
    },//选择区域查询条件
    {path:"/selectbyid/:id",
        component:selectbyid,
        name:'selectbyid'
    },//详情
    {path:"/add/:id",
        component:add,
        name:'add'
    }//详情

].map(route => {
  route.path = rootPath + route.path;
  return route;
});

// 404 页
routes.push({path: '*', component: login, name: 'login'});

export default routes;
